package com.chahua.organized.qo;

import com.chahua.organized.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author chahua
 * @date 2022/4/9 21:21
 **/
@Data
public class DepartmentQo {

    @ApiModelProperty("部门名称")
    @NotBlank(message = "部门名称不能为空")
    @Pattern(regexp = CommonConstant.NAME_REGEXP, message = "部门名称不能含有\"'&<>()+%这些特殊字符，且长度不能超过95个字符")
    private String name;

    @ApiModelProperty("父级部门id")
    @NotNull(message = "父级部门不能为空")
    private Integer pid;
}

